package com.chenfan.mcn.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author:   tangwei
 * Date:     2021/2/28 16:18
 * Description: 财务费用类型
 */
@AllArgsConstructor
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
public enum FinanceChargeTypeEnum {

    /**
     * 财务费用类型
     */

    STAR_DEVIDED_CHARGE(1, "红人分成费"),

    CUSTOMER_REBATE_CHARGE(2, "客户返点费"),

    MCN_INCOME_CHARGE(3, "mcn收入"),

    STAR_PURCHASE_CHARGE(4, "红人采购费"),

    YEAR_REBATE_CHARGE(5, "年度返点费"),

    PLATFORM_HANDLING_FEE(6, "平台手续费"),

    OTHER_INCOME(7, "其它收入"),

    STAR_MONTHLY_SETTLEMENT_CHARGE(8, "红人月度结算费用"),

    LIVE_CONTRACT_CHARGE(17, "直播合同费"),

    FORMAL_CONTRACT_CHARGE(18, "形式合同费"),

    INCOME_CONTRACT_CHARGE(19, "收入合同费"),

    LIVE_STAR_SETTLEMENT_CHARGE(20, "直播红人结算费用"),

    YES_FORMAL_CONTRACT_CHARGE(21, "已入驻红人形式合同费"),

    NO_FORMAL_CONTRACT_CHARGE(22, "未入驻红人形式合同费"),

    OFFLINE_COMMISSION_CHARGE(23, "线下佣金费"),

    PIT_CHARGE(24, "坑位费"),

    ROI_SERVICE_CHARGE(25, "保ROI服务费"),

    // LIVE_ADVERTISING_CHARGE(26, "直播广告费"),
    //v2.0.1版本更名为框架广告合同费
    LIVE_ADVERTISING_CHARGE(26, "框架广告合同费"),


    FRAMEWORK_LIVE_CONTRACT_CHARGE(27,"框架直播合同费"),

    OFFLINE_ADVERTISING_CHARGE(28, "线下下单框架广告费"),

    ONLINE_YES_ADVERTISING_CHARGE(29, "线上下单已入驻红人框架广告费"),

    ONLINE_NO_ADVERTISING_CHARGE(30, "线上下单未入驻红人框架广告费"),

    //V2.6.3 「未入驻红人形式合同费、线上下单未入驻红人框架广告费、其他收入」统一改为「未入驻红人应收款」
    NO_STAR_INCOME(31, "未入驻红人应收费"),
    ;

    @Getter
    private Integer type;

    @Getter
    private String desc;

    public static FinanceChargeTypeEnum getByType(Integer type) {
        for (FinanceChargeTypeEnum value : FinanceChargeTypeEnum.values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
}